package com.inspur.myapplication.view;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.ImageView;

import com.inspur.myapplication.R;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;

public class ImgTestActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_img_test);

        ImageView imageView=(ImageView)findViewById(R.id.imgtest_iv);

        ImageLoader imageLoader=ImageLoader.getInstance();
        //初始化
        ImageLoaderConfiguration config=new ImageLoaderConfiguration.Builder(this).build();
        imageLoader.init(config);
        //加载网络 图片
        imageLoader.displayImage("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606276246406&di=404a6677c5202f2cc21dfdefa219eef0&imgtype=0&src=http%3A%2F%2Fpic1.win4000.com%2Fwallpaper%2F2018-12-15%2F5c14703a0de4c.jpg",imageView);

    }
}
